<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // window.onload = function(){
        //     var box = document.getElementById("box");
        //     console.log(box);
        //     box.onclick = function(){
        //         alert(11111);
        //     }
        // }


    </script>
</head>

<body>
    <div id="box" onclick="alert(2222)"></div>
</body>
<script>
    // window.onload = function(){
    //     console.log(1111);
    // }



    var arr = [7, 4, 1, 8, 5, 2, 9, 6, 3];

    console.log(arr);
    console.log(arr[4]);
    console.log(arr.length);

    arr[4] = 44;



    var cat = {
        // key:value,
        name: "Tom",
        color: "black",
        weight: "2kg",
        age: 2,
    }

    console.log(cat.name);
    console.log(cat.age);

    cat.name = "kitty";

</script>

</html>